package com.csun.cmny.provider.service;

import com.csun.cmny.provider.model.vo.DeviceAlertReqVo;
import com.csun.cmny.provider.model.vo.DeviceCountVo;
import com.csun.cmny.provider.model.vo.DeviceReqVo;
import com.csun.cmny.provider.service.hystrix.DmcDeviceAlertFeignApiHystrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-03-28 13:29
 * @Description: the interface dmc device alert feign api
 */
@FeignClient(value = "cmny-provider-dmc", configuration = OAuth2FeignAutoConfiguration.class, fallback = DmcDeviceAlertFeignApiHystrix.class)
public interface DmcDeviceAlertFeignApi {

    @PostMapping(value = "/api/dmc/alert/queryDeviceAlertByDeviceList")
    Wrapper<List<DeviceAlertReqVo>> queryDeviceAlertByDeviceList(@RequestBody List<DeviceReqVo> deviceReqVoList);

    @PostMapping(value = "/api/dmc/alert/sendThresholdSaveMsg")
    Wrapper<Integer> sendThresholdSaveMsg(@RequestBody List<String> tagList);

    @PostMapping(value = "/api/dmc/alert/sendBuildingFloorUpdateMsg")
    Wrapper<Integer> sendBuildingFloorUpdateMsg(@RequestBody List<String> tagList);

    @PostMapping(value = "/api/dmc/alert/queryDeviceAlertByOldIdAndDate")
    Wrapper<List<DeviceAlertReqVo>> queryDeviceAlertByOldIdAndDate(@RequestBody DeviceAlertReqVo deviceAlertReqVo);

}
